package com.tencet.service.Impl;

import com.tencet.dao.PersonalDao;
import com.tencet.dao.impl.PersonalDaoImpl;
import com.tencet.entity.Personal;
import com.tencet.service.PersonalService;

import java.sql.SQLException;
import java.util.List;

/**
 * @author: King
 * @date: 2022/7/21 14:31
 * @description:
 */
public class PersonalServiceImpl implements PersonalService {
    private PersonalDao personalDao = new PersonalDaoImpl();

    @Override
    public Personal findALL(String pPhone) {
        return personalDao.findAllOne(pPhone);
    }

    @Override
    public boolean registPersonal(Personal personal1) {
        int count = personalDao.insertPersonal(personal1);
        if (count>0){
            return true;
        }
        return false;
    }

    @Override
    public boolean registPersonal1(String detailed, String pPhone1) {
        return false;
    }


    @Override
    public int update(Personal p) {
        int i=0;

        i=personalDao.update(p);



        return i;
    }


}